The government has written to councils saying they can still pay housing benefit to the majority of night shelters to try to clear up confusion caused by a case in Wales.