Your dd sounds a lot like a boy in my dd's class. 9 years old and loves to talk about all the things he knows, especially science. Unfortunately, this year he was labeled a "know-it-all" and at one point targeted by a group of girls who made fun of him. My dd stood up for him and we purposely invited him over for some playdates, which (I hope!) helped to make him less of a target. DD9 really likes this boy, and they have a shared interested in science. The guidance counselor at school was also a big help, not only in working with this boy but in working with the girls and helping them understand that people behave differently in social situations. Does your dd's school have a guidance program?

I think you are right on target having your dd maintain friendships with some socially savvier kids. Aside from that, how about role playing? Could you play your dd and show her how she is behaving and the way others are reacting? Sometimes that works for us. Explaining things doesn't seem to sink in with my kids as much as demonstrating their behavior.