Sheikh Muhmamad b. Husayn al-Jîzânî, professor the Islamic University, Madinah
It is a general principle of Islamic Law that it is lawful to cause harm to oneself or to others. This principle is derived from the Prophet's words: "There must neither be harm nor the imposition of harm." [Sunan al-Daraqutnî (3/77), Mustadrak al-Hâkim (2/57), and Sunan al-Bayhaqî (6/69)]
This statement is one of the Prophet's statements that are brief in their wording but rich in their meanings. In the case of this statement, its meanings are so vast and comprehensive, that it serves as the basis for one of Islam's central legal maxims: "Harm should be removed."
On the strength of this general axiom, a particular food that is in itself lawful and good becomes forbidden if it is established with certainty that it is harmful for the person to eat that particular food. A strong likelihood that eating the food is harmful is treated the same as absolute certainty in this case. The determination should be made by a reliable doctor.
The person who abandons the food must nevertheless continue to believe that the food continues to be lawful in Islam for the general public. The sacred law has not changed. He must understand that the unlawfulness in this case is particular to himself, due to the particular harm it may cause for him if he eats it. The prohibition is not to be generalized and applied to other people.
And Allah knows best.
Source: Islam Today