We show that the capacity of a complex network that models a city street grid to support congested traffic can be optimized by using routes that collectively minimize the maximum ratio of betweenness to capacity in any link. Networks with a heterogeneous distribution of link capacities and with a heterogeneous transport load are considered. We find that overall traffic congestion and average travel times can be significantly reduced by a judicious use of slower, smaller capacity links.