A police detective has been fired after regularly using racist language