I was going with the flow of traffic and the police officer only decided to pull me over for speeding. Can he or she do this?

///I was going with the flow of traffic and the police officer only decided to pull me over for speeding. Can he or she do this?

Yes. The officer can pull you over for speeding, even if you are going with the flow of traffic.  It is not a viable defense to say others were committing the same violation as you.