South African apologises for racist slur