It's kind of a long story, but trying to shape the beam at the lens doesn't work well at all. You might think of a camera lens where you can vary the aperture. Open and closing the diaphragm of lens only make the image brighter or darker, it doesn't vignette the edges. The only thing that will really work is to put a shade the extends some distance in front of the lens, which probably isn't practical or desirable.