From reading other posts here, this seems to be a very sommonproblem. I had the same issue -It felt like getting rear-ended, I also had problems with surging/searching between gears.
Reproramming DME software solved it completely for me - here is the link to my post and the info from the dealer on the workorder.
http://www.xoutpost.com/x5-e53-forum/...n-1st-2nd.html