While most of the violent crime is restricted to the Townships many of my South African friends (who do not live in the Townships) have also been the victims of violent crime. But you're much less likely to be the victim of crime as a tourist, staying in a lodge or guesthouse and enjoying a safari.
I just returned from a week in South Africa and felt perfectly safe. Naturally, you have to take care in the big cities not to flaunt your jewelry and cameras. It's not a good idea to walk around alone at night, nor is it smart to carry around large wads of cash. And precautions that you may be unused to when driving a car, like keeping your windows shut and doors locked at traffic lights, become second nature after a while.
South Africa's National Tourist Board and many tour operators do their best to keep tourists as safe as possible. There's even a National Tourism information and Safety Line at 083 123 2345 where you can report incidents and get help if you're the victim of a crime. You can also call this number to find out if you are in doubt as to the safety of a particular area or attraction. The police are trustworthy in South Africa -- it's just that they're ill equipped to deal with the volume of crime. If you see police patrolling an area it'll be quite safe.
South Africa is such a beautiful country, the issue of safety should not stop you from enjoying a visit there -- that would be a crime.
Thousands Protest Attacks Against Immigrants, May 2008 -- © Getty Images/John Moore/Staff