First of all, I am not a lawyer, so don't take this as legal advice. It is just information I picked up from looking up the New Mexico statutes on the Web.
You were cited for violating 66-3-831B, which says that the lowermost distribution of light specified in Section 66-3-830B NMSA 1978 shall be deemed to avoid glare at all times, regardless of road contour and loading.
66-3-830B says that there shall be a lowermost distribution of light, or composite beam, so aimed and of sufficient intensity to reveal persons and vehicles at a distance of at least one hundred feet ahead; and on a straight level road under any condition of loading one of the high-intensity portion of the beam shall be directed to strike the eyes of an approaching driver.
Now let's go to 66-3-827B, which says that any motor vehicle may be equipped with not to exceed two fog lamps mounted on the front at a height not less than twelve inches nor more than thirty inches above the level surface upon which the vehicle stands and so aimed, when the vehicle is not loaded, that none of the high-intensity portion of the light to the left of the center of the vehicle shall, at a distance of twenty-five feet ahead, project higher than a level of four inches below the level of the center of the lamp from which it comes. Lighted fog lamps meeting the above requirements may be used with lower headlamp beams as specified in Section 66-3-830B NMSA 1978.
Note particularly the last sentence of the preceding paragraph.
I think you were operating legally if you were using the stock fog lamps with the lower headlamp beams.
Good luck, and please let us know the result of your court case.