What you described is exactly how I would have described my first D800. I thought something was broken inside of it. Just gently tilting the camera back and forth would create a very audible sound. When I called Onecall.com about it, they told me that all of cameras with this folding flash support bracket made this sound, but volunteered to let me email them a video recording which demonstrated the rattle. Within about ten minutes of them receiving the video, I got a call saying they would be glad to pay the return shipping and provide me with a replacement D800. As I said in my first post, the replacement still has some noise if I shake it, it's not silent, but nothing like the first one.
Onecall.com has a 30 day satisfaction garuntee, and if the store you purchased your D800 has something similar, you can still return it for replacement or refund. If they don't have a replacement ready to ship, if you put them on notice that you are going to send it back, they will probably let you keep it until they do get a replacement for you. After all, they do want your money. That way you won't be without a camera.