Technically it can, but the efficiency would be low. In winter the solar irradiation is on its minimum while the consumption is at its highest level. To provide enough energy for the heating one should invest an amount equal to gas expenses for 15 years. It’s better to put the money in a bank deposit.