It is best to spay before the first heat because it almost completely eliminates your girl's chances of getting mammary tumors. Waiting til after the first heat reduces the chance some but isn't as good as doing it before the first. As long as she is over two pounds it should be fine. It is generally done between 4 and 6 months. I would not go beyond six months without spaying if you want to be sure to do it before her first heat. Even then it could happen earlier.
http://www.peteducation.com/article....&articleid=460