Of course, that's what the visa or refugee processes are for.
While perhaps "racist"is not the correct term here, I would argue that is certainly wrong, and indeed what you describe here is the very definition of bigotry.
I mean, look at what you just said. Just your own words. Is it ok to profile people based on their religion? No, of course it's not.
To do so would constitute our government taking a position of favoring some religions over others. This is clearly wrong, not only from an ethical positive, but from a constitutional one.
Ignoring your previous error, let's address this one.
How does the current executive order make anyone safer?
You are suggesting that the oppression of people is justified, because it will result in some necessary and tangible benefits.
Explain exactly what that is, and exactly how it is achieved. Be advised, I'm not going to let you off the hook of you try to dodge this. So you midaswell just deal with it straight up.
People are being judged based on their actions and their beliefs, not simply because those beliefs are different.