Draintubes?
I would suspect that what you are hearing is "draintube gurgling" syndrome.
The draintubes from the moonroof collect water. When driven at higher speeds, air enters the bottom of the draintubes and causes the collected water to "gurgle" creating the tapping sound that you hear.
I first noticed it when I drove on the highway immediately after washing my X3. I narrowed the sound down to the roof mounted center console.
There is a service bulletin that calls for the installation of check valves. The check valves allow water to drain out but are supposed to keep air from entering from the bottom of the tubes.
When I had the service bulletin work performed by my dealer, the service advisor cautioned that this is not a proven fix for the problem. So, there MAY BE a fix, but YMMV.
Good luck.