Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “If the condition necessitates keeping the feet dry, then one needs not wash your feet with water, you can simply wipe on the socks so long as it is necessary to do so. However, you must discontinue the practice when you are able to use water. But I must add a word of caution here: In order for you to make use of the above concession, it should be based on the advice of the specialist or family doctor; in other words, you cannot simply do it based on your personal opinion.
The above concession is based on the general nature of Islam: Allah says, “He has not appointed for you any hardship in your religion.” Consequently, we have precedents from the Prophet (peace and blessings be upon him) that he ordered `Ali ibn Abi Talib, who had injured one of his forearms, to wipe on the bandage.
Furthermore, I must also point out that regardless of whether you are suffering from any medical condition or not, you are allowed to wipe on your socks for a period of twenty-four hours under the following conditions: a. You must have put them on while you are in a clean state after purification (wudu’ or ghusl); b. They must be thick and not transparent; c. You have not done anything that makes ghusl (bathing) necessary, in which case you must take a complete bath before being eligible to pray. In the case of a traveller, the above concession is extended to a period of three days.”