I would spay after the first heat for a small dog. But its a highly individual decision, if you don't feel that you could handle a heat cycle and keep your dog from being bred, you should definitely spay her beforehand. A female dog in heat can NEVER be left unattended. Male dogs have been known to climb fences to get to females, and in some instances, dogs can even mate through chain link. So you have to be prepared to watch her very closely when she is not safely confined in the house.
Spaying before the first heat does lower the risk of mammary cancer, but the risk of other cancers goes up. Its about balancing risk. the risk of mammary cancer raise a little with every heat cycle- so one heat cycle raises it a little, but never spaying raises it a lot. Also, you should check to see if your dog has an innie or outie vulva. In some immature female dogs the vulva is recessed. It nearly always self corrects after the first heat when the hormones produce a sexually mature vulva. But if you spay before and your dog is an innie, it might stay like that and it can cause health issues down the road. This page explains a little about this-
http://www.woodhavenlabs.com/ins-outs.html
I'll also link you some really great articles on spay/neuter times. Most come from respected journal or are heavily cited-
Easy to read, from a vet's website
http://www.mmilani.com/commentary-200509.html
Spay specific, a study done in Rottweilers
http://www.gpmcf.org/respectovaries.html
Easy to follow, mostly focuses on canine athletes
http://www.caninesports.com/SpayNeuter.html
Technical and long, but excellent and comprehensive
http://www.naiaonline.org/pdfs/LongT...uterInDogs.pdf
For pet owners, from a Labrador breeder
http://www.claircrest.com/Problemswi...pay-neuter.pdf
Long and technical but excellent, from the Journal of the American Veterinary Medical Association
http://avmajournals.avma.org/doi/pdf...ma.231.11.1665