Just to confirm, you have the SMG gearbox? If yes, park it in gear. You can turn the engine off whilst in gear. Then, once you have switched the engine off and removed the key, push the gear lever over and it will lock in place for security.
Yes, It's telling you to put it in gear to park it. However, there is another train of thought on this with the SMG M5. If the car is left in gear after you shut it off, should you have an electrical (battery) or electronic problem when trying to restart you may not be able to get it out of gear and into neutral. Once in gear, the SMG can't be rolled backwards or else you will damage the Vanos pump and possibly the entire engine. If it has to be pulled out of a space or dragged up onto a flatbed this can be an issue if it's left in gear. Some guys (myself included) always leave it in neutral and use the emergency brake.
A few months ago a guy in England posted on this board that his parked M5 got hit by a street sweeper and pushed backwards about 3 feet. He started the car and the I drive lit up like a Christmas tree. He wanted to know what could have happened since the car was fine before the accident. We all asked the same question 'Was it in gear'? Well, it was and he was going to verify all this with BMW since his insurance company was insisting the engine couldn't have been damaged from this accident. I don't think he every followed up on this board but it was a bad situation.