It appears that there is no definitively correct answer, with various sources indicating different approaches. So I submit the following argument for the use of accidentals for D Dorian, G mixolydian etc. as pure opinion with no claim to authority.
The most important information to immediately glean from a key signature, it would seem to me, would be tonal center and general modal nature of the scale - major or minor, i.e. brighter or darker.
This coupled with the fact that when viewing a key signature, we almost always expect it to represent one of two possible tonal centers, each corresponding to a minor or major mode scale, I would suggest that using the standard key signature for the given tonic and mode (major or minor) would get the reader this information the fastest, and be most in line with our standard expectations.
For example, if the piece were in D Dorian, using a key signature corresponding to D minor (i.e. one B flat) would far more rapidly convey a tonal center of D and a minor modal nature, than would a key signature with no sharps or flats. Even though the D Dorian scale has none.
That the reader may at first assume the piece was in D natural minor rather than D Dorian is less important than at first assuming the piece will be in A minor or C major, as is likely for most of us, with no sharps or flats in the key signature.
Seeing B natural accidentals in the piece would then lead to a minor ;) and less immediately important refinement of that initial assessment, that the piece is in fact in Dorian rather than natural minor.
In the example mentioned above, namely D Phrygian (which would have a B and E flat in the scale), I certainly would not use two sharps, which would correspond to a standard D major key signature. Phrygian being a minor mode scale, I would use the standard key signature for D minor, i.e. one B flat. Actual E flat notes would then be indicated by accidentals.
Granted this method requires the use of some accidentals but not particularly excessively, and as mentioned elsewhere, accidentals themselves do convey information.
In summary for a piece with a given tonal center and in;
Ionian, Lydian or Mixolydian mode: These being major mode scales, I would use the standard key signature corresponding to a MAJOR scale for the tonic.
Aeolian, Locrian, Dorian or Phrygian mode: These being minor mode scales, I would use the standard key signature corresponding to a MINOR scale for the tonic.