Polynomials with minimal set of values and the equationf (x) = f (y) in a finite prime field