Even if you're not close with your boss, chances are you have a working, first_name_basis relationship. Maintaining that in your official letter is okay. You don't need to keep a Victorian level of formality here__just make sure it's a professional tone.
Sure, it may sit in the depths of HR until the end of time, but you can be sure of two things: One, your former boss (and future reference) will read it and be impressed. And two, if you ever decide to come back to your company (hey, it happens), it's a very good thing that last thing on file is a great, professionally written resignation letter.