Praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
If this is recommended by a trustworthy doctor who is god-fearing and knowledgeable, then it is permissible to have an abortion because some types of thalassemia are dangerous while some aren`t. And Allah The Almighty Knows Best.