You don't actually lose XP, you still get the same amount of points as if you didn't kill anyone. Only on the stat board it shows you have a lower score than the other players, but really you gain the same amount of XP as if you didn't team kill.
In COD4 HC S&

, I team killed a lot, and didn't lose any XP.