The ripples or ringing is caused by some spurious inductance somewhere resonating with some capacitor to form a tuned circuit. The inductance is likely to be the leakage inductance in your output transformer. Are you sure the rinnging is not caused by the scope lead? You could try clamping the pulses to +Vcc and 0V, so their positive excursion can't go above Vcc and the negative below 0V or you could try a snubber (series C and R) across trnasformer, to lower the resonance frequency and lower its Q so the rinngs reduce in amplitude.
Frank