The prime minister has not ruled out tax rises to fund a long-awaited shake-up of social care.