Population genetics and speciation