Catalyzes the oxidation of D-2-hydroxyglutarate (D-2-HG) to alpha-ketoglutarate (By similarity). Also catalyzes the oxidation of other D-2-hydroxyacids, such as D-malate (D-MAL) and D-lactate (D-LAC) (By similarity). Exhibits high activities towards D-2-HG and D-MAL but a very weak activity towards D-LAC (By similarity). (R)-2-hydroxyglutarate + A = 2-oxoglutarate + AH2 (R)-malate + A = AH2 + oxaloacetate Belongs to the FAD-binding oxidoreductase/transferase type 4 family.