British Gas has been forced to pay out to households that had a prepayment meter installed without their permission, regulator Ofgem said.