Dear {Recipient}
I sincerely regret my actions on {MM/DD/YYYY}. They were inappropriate and resulted from a momentary lapse of judgment on my part.
Please accept my apologies for {state the problem} and for creating an awkward and embarrassing situation.
You can expect better from me in the future for I will practice better restraint and exhibit behavior that befits the environment and situation.
Please feel free to contact me at {email/phone} if you would like to continue this conversation. I look forward to hearing from you and putting this matter behind us.
Sincerely,
{Sender}
{Sender}