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.
Otherwise, look to the history of your company. How have your boss and other managers handled employees' resignations? If you see a pattern of upper management refusing to let the team members work out their notice, you can likely expect the same.