When the original "ditch light" requirement was issued, locomotives with oscillating headlight but not equipped with "ditch lights" were considered to be in compliance with the requirements for 4 years following issuance of the FRA's final rule. 1996 is a date that sticks in my mind as the year either the interim rule or the final rule was issued, and by now any diesel or electric locomotive built after December 31, 1948, must have "ditch lights" to operate without the 20 MPH speed restriction.
However, oscillating headlights are still permitted on locomotives equipped with "ditch lights" as additional warning devices at the option of the railroad which operates the locomotive.