Was there any other traffic infraction? Once you have been pulled over for a legitimate traffic violation, an officer may request dog sniff if he has reason to believe that drugs may be found. The most often used excuse by officers is the "smell of burnt marijuana." If there was not a legitimate traffic violation, you may have a defense to the search.
You need to contact a criminal defense lawyer as soon as possible.