I can relate to this a bit, I feel like I'm a bit on the milder end of the spectrum, haven't been tested for autism yet but for ADHD, but my brother tested and was found to have Aspergers so I feel I might have a lighter version of it? I don't have the outbursts or the fits but I tend to have a problem with looking people in the eye when talking. I find it tiring to make eye contact regularly (looking into the distance is a sort of reset I feel where my brain just wanders off but I still stay in conversation mode)
But yeah it's possible because my brain wanders I might say something which I didn't know to be offensive. I've learned that if that should happen, you should apologise and clarify immediately when you realise you've said something offensive (I have a high EQ so I usually sense when something is off with a person thankfully) saying sorry needs to have a follow up on understanding the other person's side of the story