Try following the regular letter format, and include
1) that you are sorry
2) if there is any reason why you did this - not to excuse yourself but so the person reading it might understand why
3) that you are ashamed of your actions and promise never to repeat them