In many countries, the civil and religious wedding ceremonies are two entirely separate things. Many couples, in fact, have two weddings: the civil wedding in a town hall followed by a religious wedding in a house of worship.
A couple married only in a house of worship, in such a country, would not be legally, civilly, married.
My suggestion to you is first to accertain if this is the fact. You did not mention your home country, but as far as I know, nations such as Mexico, Germany and France do not civilly recognize a religious wedding.
Second, discuss the situation with an immigration lawyer who is familiar with the law in your home country and is licensed to practice US immigration law.
Third, you might want to discuss your predicament with a religious authority in your home country. It is possible that there are other, perfectly acceptable, alternatives that you haven't thought of. Clergy members can be creative when it comes to solutions to weird situations.