Labor candidate apologises for rape joke