When apologizing say, "I was wrong. What I did was careless, thoughtless, etc. Will you forgive me?"
That keeps it about the other person.
Saying, "I'm sorry, but..." That places the emphasis on you (I had a headache, I had a rough day at the office, the kids drove me crazy today, etc.) rather than making peace with the other person. It's about them, not you.