Optimization of traffic flows in congested metropolitan areas