Since the words "one nation under God" are used, we are certainly free to take this pledge. It is then understood that our allegiance is pledged only so far as we are not forced to disobey God's laws.
The Bible commands us to be good citizens of the country in which we live. We know God has set government over all human beings, and every Christian should "be subject to the governing authorities" (Romans 13:1). This is with the understanding that our greater, higher, first allegiance belongs to God (Acts 5:29).
A similar question involves saluting the flag. Some believe that saluting the flag is idolatrous. However, saluting is not in itself an act of worship, but merely a matter of showing respect. Through Paul, God commands us to render respect and honor where they are due (Romans 13:1-7).
We salute the flag, not because it is the symbol of another god, but because it stands for the freedom and blessings that the Most High God has given this nation.