Genomic scan for single nucleotide polymorphisms reveals patterns of divergence and gene flow between ecologically divergent species