That 'D' behavior is normal.. and I agree with you, it lugs a little going 40mph in 6th gear
The X5M tranny is trying desperately to get the gas mileage up.
I drive mine in sport mode mostly (5th gear is the top 'S' mode gear as far as I can tell), but the downshifts are a little abrupt.
FWIW, I drove mine in 'drive' most of the time during break in. You're not going to hurt anything.