Like Momwithcamera posted -- Tell the teacher exactly what you told us here: What the doctor said. Also add that it happened just like this at the start of preschool, so you have a precedent for this being your daughter's reaction to this type of change. And be sure to thank the teacher for her concern! The teacher was thinking of your little girl's health and was right to let you know (in case there might be an infection). Keep up a good relationship by remembering to acknowledge the teacher's good intentions and let her know you appreciate her good communication.
And the dr. is right -- this is typical for many young girls, especially those who are at all nervous about being clean and not getting wet in a new social situation. She will outgrow it just as she did in preschool.
Naturally if she seems to continue to go a lot, or starts doiing it at home, have her checked for a UTI.