If the boat was originally wired for two independently switched bulbs then it was wired as a "masthead light".
In the "anchor" position, one bulb would light and offer 360 deg viewing.
In the "travel" position, the other bulb would light up instead, and it would have been "blinkered" so that there was only a 225 deg field of view. ( OR the travel lamp had a 135 deg view, and the other had a 225 deg view, and when in the "anchor" position, -both- would light. Different method, same result )
---
See
the RoR Rule 21 and 23 for details... but some vessels may use either a single all-around light when running ( this doubles as an anchor light ) OR, when running they may use a "split-lighting" method, where the masthead presents the forward 225 degrees, and a light on the transom fills in "the hole" presenting 135 degrees from the transom.
--
"Would it not be ok to replace with a single led with 2nm output?"
See the Rules comment above. you may be an "option boat, but if you change the masthead light to an all-around ( when running ) you will need to disable the transom light. Personally, I greatly prefer the "split method" to the sing all-around. YMMV. Check the RoR to see where your boat fits in the rules.
Mostly, the "right" answer it trade in the all-around for a masthead and upgrade it that way. Switching is, imho, a move backward, and would involve more work, or would leave a hole or a dunsil in the transom.