If we want for prevention from disease or we don't know whether we carry any disease, is it permissible for us to take khak e shifa every 40days?

No.
According to narrations, it is for cure, not for prevention.