For discounts, I would look to the large number of hotels just across the river in the Crystal City neighborhood of Arlington. Crystal City is right next to Reagan National Airport (DCA) and on the Blue and Yellow Lines of the Metro, and hotels that are a longish walk from the station will run free shuttles to the Crystal City Metro, Pentagon City (one stop north), or the airport (one stop south).
From Crystal City it is three stops on the Yellow Line to L'Enfant Plaza and the National Mall, four stops to Penn Quarter museums and restaurants. Sit on the left side of the train and you will have a nice view of the Jefferson Memorial as you cross the bridge into the District. On the Virginia side you are near the Pentagon Memorial, Air Force Memorial, Arlington Cemetery, and the Marine Corps War Memorial, and you can walk from the Arlington Cemetery stop to the Lincoln Memorial across Memorial Bridge.
The Crystal City neighborhood is safe, but rather boring (and ugly) even by DC standards, with no real nightlife and just a handful of restaurants on two strips, 23rd Street and Crystal Drive. Your hotel will be a charmless high-rise from an international chain. If this doesn't suit you, you'll need to pay a bit more. I would look into hotels or bed-and-breakfast inns in the Foggy Bottom or Dupont Circle areas, which are on the western outskirts of downtown, but have more going on after dark. The Ritz Carleton, the Fairmont, and the Park Hyatt are situated in between in an area recently known as the West End.
Most places within a 20-minute Metro ride north, west, or south of the National Mall have gentrified in the last 10-15 years, at least for a 2-3 block radius from the Metro station (e.g. Columbia Heights), though I would caution that "danger" and "safety" can be subjective.
The Rosslyn area of Arlington is mostly high-rise office buildings. It has a very low crime rate, but because there are few people around after work hours, I have more than a few friends who feel uncomfortable walking around there alone at night. Directly across the river, Georgetown is a wealthy neighborhood of historic homes and chi-chi shops that is always bustling with tourists and preppy students. Yet, in the 14 years I have lived in the Washington area, I have met more people who have been mugged in Georgetown than in any other neighborhood (granted, there are not very many people in my circles who frequent Anacostia or Ivy City). Perhaps everyone is off guard after their $50 steak, or perhaps the canal and the old buildings offer great locations for criminals to hide and to escape. My point is that feeling safe and being safe are not necessarily correlated, and that even in a "safe" area you should always be aware of your surroundings and be cautious.