A variational procedure is given for finding the pulses for which the initial temporal rms width and the rate of increase of this width are jointly minimized for propagation in non-absorbing media with arbitrary dispersive properties. We show that, while in linearly dispersive media the optimal pulses are Gaussian, in other situations such as a hollow metallic waveguide or for purely cubic dispersion departures from Gaussian behavior become evident. An interpretation of the results in terms of suitable phase-space representations is also given.