Upvote:5
Since April 2010, holders of national D-type visas of a Schengen country can travel freely in the Schengen area, as long as they observe the 90/180 day rule for the time they spend on other Schengen countries than the one their visa is for.
(See regulation (EU) 265/2010 amending the Schengen Convention; further amended by 610/2013 to clarify the 90/180 day rule).
This means that your Polish D-visa will allow you to enter the Schengen area at Frankfurt and proceed within Schengen to Poland. You don't need an additional visa for that.