It could be written B/D. It could even be written B7/D. Either of those would accurately describe the pitch content.
However, presuming this is an interpretation from a lead sheet, D7 clearly indicates that the chord is part of a ii-V progression (in G major, the apparent key of this [part of the] piece).
The D7 can be "heard" since the chord contains D-F#-A, and the C was just heard in the previous chord, setting the overall tonality. The B then is the 6 or 13 — a chord extension — which also describes the D# (i.e., Eb = b9).
So the symbol to describe the complete voicing would be D7b9(+13add13) or, since the C isn't literally part of the chord, D6b9.