Islam strongly orders us to do our best to become good citizens in our respective communities and in the countries where we live. A Muslim has to honor the laws of the country where he/she lives as long as such laws do not contradict the teachings of Islam.
As a Muslim living in the west, there is nothing wrong that you take the oath of citizenship as long as you are committing yourself to fulfill your duties of good citizenship while not contradicting the Sovereignty of Allah.
Sheikh Ahmad Kutty, a Senior Lecturer and an Islamic Scholar at the Islamic Institute of Toronto, Ontario, Canada, states the following:
You are allowed to take the oath of citizenship as long as you are clear in your mind that you are doing so without contravening the sovereignty of Allah especially if the charter already assumes the sovereignty of God; as a Muslim you are obligated to obey the laws of the land and stand to defend it against aggression, and work for upholding justice and rights for all of its citizens; none of these ideals is contrary to the Islamic teachings.
So be clear in your conscience: By taking the oath of citizenship you are committing yourself to fulfill your duties of good citizenship while not contradicting the Sovereignty of Allah, which is supreme. The laws of citizenship in some countries in the west do allow you freedom to act according to the dictates of your conscience. You can stand up for what you believe to be right and just within the charter of rights granted to all of its citizens.
In conclusion: since taking the oath of citizenship in no way constitutes a form of shirk, you should not have any hesitation in doing so as long as your conscience is clear.