If I remember correctly, some Cateye lights such as the Omni 3 came with a round plastic tube adapter accessory (it looks like a small circular plastic tube that's been cut along its length); apparently you use that piece to make a non-round part of a seatpost, round again... though they're more useful for aero seatposts shaped like fins (e.g. V-shaped, rather than D-shape in your case). If you have that piece from any of your lights, you might give it a try.
Alternatively wrap some inner tube or similar around the seat post where you want to attach your light. Or use something mouldable like Sugru?