Probably you don't want to use ., since it will match anything, including a line beginning with something like "XDefault". Also, the + matches one or more, so the regex you wrote would only match if there was at least one character in front of the D. If you want to enforce that there is only whitespace at the beginning or end then use \s* instead of .+, and also anchor at both beginning and end. So your regex becomes /^\s*Defaults (requiretty|env_reset)\s*$.
Here is a one-liner:
perl -pi -e '$_ = "#$_" if /^\s*Defaults (requiretty|env_reset)\s*$/'