I don't think anyone is under any obligation to prosecute illegal laws, so his choices are actually: Do his job and drop the charges, or prosecute an illegal law. The Constitution being the supreme law of the land, and any law being repugnant to the Constitution being void, his job IS to drop the charges.
So, he should just use 'His' judgement, and only prosecute laws he agrees with, or against clients he doesn't like. huh? Why go through the bother of challenging the counstitutionality of the law? The prosecutor's job is to prosecute people accused of breaking the law. If the law is found to be unjust, or uncounstitutional; the law is struck down. On the other hand, you are giving a gov't bureacrat the ability to selectivly enforce laws based upon a whim.