Yes, the court *can* dismiss the ticket, and may if you promptly get insurance and otherwise have a clean driving record--or at least may reduce the fine or other penalty. However, they are not required to do so: since you lacked insurance when pulled over, you have already committed the offense, and getting insurance after the fact does not make that offense go away. It is discretionary, not mandatory, on the part of the court to dismiss the ticket under these circumstances, so you can't count on it happening. (On the other hand, you need insurance anyway, so you most likely should go ahead and get the insurance.)