The problem is that being at the legal limit doesn't protect you from a fine if the officer decides the tread is insufficient. The law is a bit tricky here: technically 1.6 mm is the minimum, but many officers interpret that as "it's reached the end of its useful life" and fine you anyway. It's not fair, I agree, but that's what happens. A technical inspection from 3 months ago isn't a shield because tire tread wears continuously, especially if you drive a lot on the highway or on poor roads.
You can try to contest it, but you need to know what you're getting into. First, request a copy of the fine with all documentation - photo, police report, everything. Then, get the technical inspection receipt you passed and keep it safe. If you can prove the car passed 3 months ago and that the wear since then is normal, maybe you have arguments, but honestly case law doesn't favor you much on this point.
Your best move is really to find a traffic lawyer or contact a consumer protection association. They know the precedents and can tell if it's worth fighting or more sensible to pay. Some manage to overturn fines like these for procedural flaws - maybe the officer didn't measure correctly or didn't record it properly. But don't count on miracles: tires scraping the limit almost always get you busted.