Yes, you can. From the Romanian ministry of Foreign Affairs' website (emphasis is mine):
According to Emergency Government Ordinance no. 109/2013, as of February 1st 2014, the bearers of uniform visas (with 2 or multiple entries), long-term visas, as well as residence permits issued by Schengen Member States shall no longer be required to hold a short-stay visa to enter the territory of Romania for a time period that may not exceed 90 days in any 180 day period.
They hold one of the following travel documents, issued by member states of the European Union that fully apply the provisions of the Schengen Acquis (Austria, Belgium, the Czech Republic, Estonia, France, Finland, Germany, Greece, Hungary, Italy, Latvia, Lithuania, Luxembourg, Malta, The Netherlands, Poland, Portugal, Spain, Slovenia, Slovakia, Sweden), by Schengen Member States (Switzerland and Liechtenstein – in accordance with the provisions of EC Decision 896/2006), as well as Iceland and Norway:
They hold a “long-stay visa”, (in keeping with Article 18 of the Convention Implementing the Schengen Agreement);
Your type D visa is one such “long-stay visa”.