Energy regulator Ofgem has approved funding for infrastructure needed to support more charging points.