The stellar populations and evolution of H II galaxies - I. High signal-to-noise optical spectroscopy.