That black foam just keeps light from reflecting up behind the flyscreen. It's just a distraction when you're riding at night and try to look at the gauges.
The foam? If you're moving the flyscreen down an inch I'd just see if you can leave it where it is. If it gets in the way you could try to trim it. You can toss it, it won't hurt anything but the light might start to bug you. I'd just try to move it up. Stick it back on with some rubber cement.
I tossed mine, the light isnt that bad, Its not like your looking at your gauges every second anyways. Im on the stock light tho, I cant comment about HID's