With this theorem taken from "Elementary Number Theory in Nine Chapters" by James J. Tattersall (p. 204, Theorem 6.20) we can choose m and p such that f(x) = x^m mod(p) is bijective: choose m and p so gcd(m, p - 1) = 1.
To convince yourself that f is not always bijective try m = 5 and p = 11 for an example with lots of collisions.