On what basis would it be unconstitutional to prohibit a Muslim from being president?
My general rule of thumb for dealing with whether or not something is constitutional was to ask myself if this argument would have worked in 1787. If it wouldn't work then, then it ought not be considered valid in the present.
Article VI of the U.S. Constitution --
"...no religious test shall ever be required as a qualification to any office or public trust under the United States."
Article VI, Section 3, of the Constitution of 1787:
...but no religious Test shall ever be required as a Qualification to any Office or public Trust under the United States.
Two bases:
First, the Constitution specifically prohibits the use of a religious test for any office.
Second, the Constitution also sets forth the qualifications for President (natural born citizen, age 35+, 14+ years residence in the United States), and does not grant Congress the power to add additional qualifications/restrictions.
It is unconstitutional to legally bar Muslims from office. It is totally constitutional to not be suicidal enough to elect them to office.