More than £30 million will be pumped into the West Midlands to help create safer cycling and walking routes across the region.