We have performed an optimization study on a train of laser pulses in a Nd:YLF master-oscillator power amplifier chain. Instead of using a flat train of input pulses and proper timing of the input pulses with respect to the pump pulse to keep the output pulse flat, we used a pulse-shaping technique. Then the maximum gain could be used, resulting in a 70% increase in output pulse energy. We constructed a special feed-forward loop to control the temporal shape of the train. We compare the results with a computational model based on the rate equations in the Nd:YLF amplifiers.