Gain shaping in pulsed diode side-pumped solid-state lasers