Laser cooling of molecules employing broadband optical pumping involves a timescale separation between laser excitation and spontaneous emission. Here, we optimize the optical pumping step using shaped laser pulses. We derive two optimization functionals to drive population into those excited state levels that have the largest spontaneous emission rates to the target state. We show that, when using optimal control, laser cooling of molecules works even if the Franck-Condon map governing the transitions is preferential to heating rather than cooling. Our optimization functional is also applicable to the laser cooling of other degrees of freedom provided the cooling cycle consists of coherent excitation and dissipative de-excitation steps whose timescales are separated.