I say "I'm not racist/sexist/homophobic but..." because clearly if I say it I'm not.
Joking obviously
Why were they thinking you're bigoted? There is no single I'm not a bigot answer, it's in your actions. You'll have to argue why whatever it is that is making them think you're bigoted isn't bigoted or isn't true. If they have no reason to think you're bigoted and just assume then they might have problem with bigotry themselves or really misinterpreted something. If a lot of people think you are them you might need to do some introspection.
There is a situation where "My best friends are gay..." is relevant and that's when someone claims you don't like someone because they are gay not because you just don't get a long with them.
Joking obviously
Why were they thinking you're bigoted? There is no single I'm not a bigot answer, it's in your actions. You'll have to argue why whatever it is that is making them think you're bigoted isn't bigoted or isn't true. If they have no reason to think you're bigoted and just assume then they might have problem with bigotry themselves or really misinterpreted something. If a lot of people think you are them you might need to do some introspection.
There is a situation where "My best friends are gay..." is relevant and that's when someone claims you don't like someone because they are gay not because you just don't get a long with them.