MacDonald tallied early in the third period when his slap shot off a feed from Brock Nelson found its way through traffic and past Michal Neuvirth.
Nabokov turned aside all 22 Capitals shots en route to his second shutout of the season as the Islanders ended a five-game skid.
Neuvirth finished with 27 stops for the Capitals, losers of three in four games.
Lytro unveils camera that can focus a photo after shooting it
Easer Egg Roll brings thousands to White House