It is no problem if you can speak English
South Africa has eleven official languages, with English being one of them. Most South Africans, especially if it is a second language, speak English, so tourists will have little trouble talking. If you opt to acquire a few basic terms in a local language, make sure you explore which languages are spoken where in the country, as not everyone speaks all eleven.
When traveling, it's always a good idea to learn a little of the local language. In other circumstances, understanding the local language will be the only method to communicate because few people understand English. Even if English is widely spoken, knowing a few local language is sometimes just courteous.
You can literally get away with speaking English in South Africa. One of the official languages of the country is English (there are 10 others). Afrikaans and Zulu are two more commonly spoken languages in South Africa.