The West Midlands will receive £171 million to repair roads across the region and make them safer, the government have revealed.