There are a variety of answers here. I'm adding my own position to provide some straightforward advice. With the nature of the question, any advice given may be subject to the different dynamics of different people; specific approaches may or may not work out well in different individual circumstances (that involve different people). That being said, here are the instructions I provide for you to consider acting on.
You must absolutely back down, for your own good. The professor is in a position of authority over you, and may have some leeway in deciding whether to grade something favorably (whether in this class now, or another class). You don't benefit from being on the professor's bad side.
- Apologize for taking a stance of being offensive. By being offensive, I don't necessarily mean that you were personally slandering. Your "offensive" nature might not have been any more inappropriate than playing an "offensive" role in basketball. Still, sometimes instructors try to prepare students for industry by making sure that students are used to humbly taking instructions.
- or apologize for not doing a better job of communicating in a way that didn't end up being annoying (or worse).
All of us humans can communicate in a way that doesn't end up pleasing everyone. This is a flaw that seems universal to our species. If we're very honest about life, then we can feel some degree of sorrow (a.k.a., being "sorry") for unpleasantness we cause, even if the amount of sorrow is slight because we don't feel like we could have done better. Just be disappointed in the lack of ability to completely pacify everyone, and then you have the basis of an honest apology.
Don't feel like you need to convince the professor that you're suitably reformed and are now a stellar model of what the professor would identify as perfection. It seems that you burned a bridge, inadvertent as that may have been. How easy it is to repair the damage, or whether that is even possible, is highly dependent on the professor, and you might not be able to recover fully. Writing a lengthy apology may do more harm than good. Keep it short and sweet; three sentences or even one may be sufficient. Just communicate a posture that that shows you're going through the step of apologizing, and that may be the best that you can do. (Well, that, and you might want to walk on egg shells for the duration of time that you interact with that professor. Whether that is needed may depend on just how thoroughly those bridges do end up getting repairs. Even if you do again appear to be on the person's good side, make sure to never repeat the same action, so that you don't re-offend in the same way. If you do, any acceptance of your apology will likely be revoked.)
This is coming from a person who got on the wrong side of a department chair within the first 80 minutes of a program. This was because I tried to dutifully defend a score, and I guess she just deemed me to be adversarial. She even took me out of the class for a one-on-one chat, which was a first for me. I was terrified, and remained very cautious throughout the entire program. It was not pleasant. Towards the end (maybe my second-to-last-day there), the topic of that early encounter got brought up. (I think I may have delicately brought it up, asking if she still thought of me as a "troublemaker". It was a slightly risky thing to do, but I served her well and even did some good for her program, and was genuinely interested in feedback, so I took that risk.) I even got an acknowledgement of the "misunderstanding" that the department chair had.
I remained pretty stressed throughout the program, but I did end up getting a straight A in every course (thoroughly demonstrating a reversal of prior academic years where I had some different results). As I could (unpleasantly) handle the stress I endured, the end result was quite worthwhile for me.