We have measured the speed of both pressure waves and shear waves as a function of depth between 80 and 500 m depth in South Pole ice with better than 1% precision. The measurements were made using the South Pole Acoustic Test Setup (SPATS), an array of transmitters and sensors deployed in the ice at South Pole Station in order to measure the acoustic properties relevant to acoustic detection of astrophysical neutrinos. The transmitters and sensors use piezoceramics operating at ∼5-25 kHz. Between 200 m and 500 m depth, the measured profile is consistent with zero variation of the sound speed with depth, resulting in zero refraction, for both pressure and shear waves. We also performed a complementary study featuring an explosive signal propagating from 50 to 2250 m depth, from which we determined a value for the pressure wave speed consistent with that determined with the sensors operating at shallower depths and higher frequencies. These results have encouraging implications for neutrino astronomy: The negligible refraction of acoustic waves deeper than 200 m indicates that good neutrino direction and energy reconstruction, as well as separation from background events, could be achieved.