Optimal synchronization of Kuramoto oscillators: A dimensional reduction approach.