Engine limiter for 66cc 2-stroke?

I live in Texas where the law is that your "motor assisted vehicle" needs to do 20 max. The kit I'm looking at will probably do 40. My question is this: is there a way for me to limit the engine ( and thus my top speed) so that if a cop tries it out, all i have to do it flip a switch or something and it can only go 20?

Cops don't "try them out". They just go by how fast you were going.
It's not probable that you can be so cop-aware that you can always switch to "slow" when a cop is in view. Best to just make the bile slow by design. Things that slow a bike down:
smaller rear tire.
large rear sprocket.
intake restrictor.
exhaust restrictor.
raise the transfer ports so that excessively limited blowdown time limits rpm.
get a Jaguar CDI and add secondary capacitance to the circuit to get a lot of spark retard at the rpm you want it to max out at. The KDX used 4.7uf to limit revs to 9000. Maybe twice that could limit it to 4500, and in combo with a large rear sprocket that might be as slow as you want.
But I think you are wrong about 20mph as the limit. All I've read about Texas shows it to be 30mph. In that case you are OK with a 48cc that tops out at 25mph. Not sure what the 69cc (80cc) tops out at without any mods.