The influence of lateral beam profile modifications in scanned proton and carbon ion therapy: a Monte Carlo study.