Dexter, I like your answers, but they are so mathematical it gets confusing at times. Anyway...
Okay, so let's just pick the standard position space representation of momentum and position operators, and a wave function. Now suppose that instead of p = -i \hbar \partial_x we pick p = - i \hbar \partial_x + f(x). This most certainly satisfies the canonical commutation relations. But we also like to have momentum be the generator of space translations, so that
\psi(x + a) = \exp[i p a/\hbar] \psi(x)
Okay, now pretend that our momentum operator is the new one, and we want to look at the momentum operator acting on the translated wave function. Since all we did was shift our coordinates, we expect the action of the momentum on the wave function to be the same, yes?
Well,
-i \hbar \partial_x \psi(x + a) = -i \hbar \partial_x \exp[i/\hbar (-i \hbar \partial_x + f(x) ) a] \psi(x)
Do you see that this adds terms that go like f'(x) to the momentum operator? This is why you can't add an arbitrary function of x to the momentum operator. If you add a constant to it, all you do is change the wave function by a phase that you can't detect anyway, so this gets the job done.