Labour is "absolutely not" engaged in a class war, the prime minister has said.