Optimizing synchronizability in networks of coupled systems