Can I prevent my new account details being given to someone who sends one-off payments to my old account?

You may be able to transfer your payments to your new bank without redirecting payments from your old account, and you should discuss this requirement with your new bank.