Is being a scientist compatible with speaking Hungarian? The answer is provided by pointing to the number of scientists who speak Hungarian. Similarly for being a scientist and believing in God. One does not have to speak Hungarian to accept this fact. The same in the other case. Nevertheless, one may be curious about how these scientists deal with what some atheists see as conflicts or cognitive dissonance.
Such is, for instance, Lisa Randall, an American theoretical physicist and a leading expert on particle physics and cosmology. Answering an interviewer's question she admitted that "there are religious scientists out there, and truly religious scientists, which I find very confusing." And elsewhere, "scientifically inclined people - with or without faith - will try to pry open the universe to find answers."
In both quotes Randall is shown as an honest atheist scientist who admits that there are "scientifically inclined people with faith" or "truly religious scientists" although she finds this fact "very confusing".
She gives reasons for her confusion - a religious scientist would call it challenge - in her recent bestseller Knocking on Heaven's Door: How Physics and Scientific Thinking Illuminate the Universe and the Modern World (Ecco, 2011):
The problem is that in order to subscribe both to science and to a God - or any external spirit - who controls the universe or human activity, one has to address the question of at what point does the deity intervene and how does he do it. ... A religious or spiritual belief that involves an invisible undetectable force that nonetheless influences human actions and behavior or that of the world itself produces a situation in which a believer has no choice but to have faith and abandon logic - or simply not care.
Leaving aside the fact that she uses the word "logic" where others would use "reason", and does not explain what she means by "having faith", what she describes here is in fact a problem usually referred to as divine action. It is obvious that Randall has a good understanding of contemporary physics, the most abstract among sciences, but it is less clear how good (and contemporary) is her understanding of religion, faith and belief in God (she does not seem to distinguish between the three). Nevertheless, by her reference to the problem of divine action (miracles?) she hit the bull's eye: A scientist who believes in God, needs to reconcile this belief with contemporary science. This is not easy, and practically impossible for those who would want to reconcile the findings of contemporary science with an understanding of God's agency that is anything but contemporary; for instance based on a literary reading of the bible or other ancient texts. (The problem of evil is probably even more challenging for a believer in an "omnipotent and benevolent" God, however theodicy - with its numerous attempts at analyzing and hopefully solving the problem - does not require a deeper understanding of contemporary science.)
Of course, the problem of divine action does not bother a deist - like e.g. Einstein or Anthony Flew - who believes in a God, who never interacts with his creation. As even Christopher Hitchens admits, deism is a position that is impossible to refute. So I shall not deal with deism here.
As for Randall's "confusion" leading to her conclusion, one is tempted to say that a contemporary physicist like she should be aware that even where physics is concerned, a person with only an outsider (non-mathematical) understanding of relativity and quantum mechanics can only either accept uncritically what specialists tell him/her - even when it looks like abandoning common sense (perceived as reason, or even logic) - or "simply not care". Moreover, quantum physics, although experimentally many times verified, leads to a number of paradoxes and enigmas even for a person well versed in mathematical physics and philosophy thereof. The difference, of course, is that every physicist and/or philosopher of science has to face these enigmas of quantum physics, whereas the enigma of divine action is of interest only to a scientist (and any educated person) who is also a theist.
In the case of Christianity, divine actions are, roughly speaking, twofold: "special divine acts" (Jesus' resurrection, virgin birth and other miracles as described in the Bible), and effectiveness of petitionary prayer (in distinction to prayer as pure meditation). The first kind are God's acts, miracles, that are supposed to have happened only once. The second kind are supposed to be recurring in different situations, usually involving human initiation. A contemporary Christian scientist's acceptance of divine acts of both kinds - whether on their face value, or suitably interpreted - does not have any effect on his/her scientific investigation and conclusions. This is known as methodological naturalism, which is not exactly the same as Randall's "simply not care". Laplace's famous remark to Napoleon about not needing the "God hypothesis" to explain the movement of planets is today self-evident to any student of Newtonian mechanics, theist or atheist.
One general comment about "miracles": Events that can be recorded by scientific instruments as violations of known natural laws would simply be absorbed by science as new observations, new facts. A new, more embracing, theory (and/or natural laws) would be sought by scientists to explain them. Seeing these unexplained events as the result of some direct divine act would simply mean a return to the many times discredited god-of-the-gaps argument. Also, a "miraculous healing" always involves some willpower, some faith in the source of healing (c.f. Jesus' "your faith has healed you"), even when contemporary medicine cannot explain this acting of the mind on the body. No prayer has yet brought back an amputated leg.
However, a person - scientist or not - who believes in the God of Abrahamic religions will probably not agree that everything he/she sees as God's intervention can be this easily explained away. A Google search for "divine action" will provide over one hundred and fifty thousand links. Most of these display a naive understanding of science (or theology or both), but not all, including some from authors who are established scientists.
Indeed, "much effort has been invested in recent decades in finding clues in contemporary science that allow for an account of special, providential divine actions, without postulating violation of natural laws" as Nancy Murphy puts it in her survey article in "The Cambridge Companion to Science and Religion", (ed. Peter Harrison, CUP, 2010). One is trying to find interpretations of contemporary scientific theories that allow for an interpretation of God's action so as to provide an understanding of the latter from within the former. A satisfactory account of how this can be achieved is still lacking. One is trying to make use of quantum physics, chaotic systems, evolution, emergence, complexity or top-down causation "overpowering lower level causal forces", etc. These concepts as such are meaningful for all scientists interested in a deeper understanding of reality. Naturally, their possible explanatory role regarding divine agency is meaningless to atheists.