Upvote:2
Border guard is typically interested in the following
The D visa pretty much clears the first concern as for the duration of that you are allowed to stay and work (limited hours but still)
It says nothing about the second concern and a few flights in themselves will not raise red flags. It's fully normal to take non-direct flights and TAP is known to be cheap anyways.
So based on what you said -- which might not be the full story of course -- and without being actual border guard I would say you shouldn't be worried.
Edit: reviewing this a day later, I see I haven't answered the question in the title "Can you be denied entry to Schengen zone if you hold a valid D visa?" -- well, of course. Show up with a kilogram of heroin and see what happens. Even if I don't want to be that glib, border control have the final say whether you are allowed to enter. But still, there are checks and balances in place and they won't just deny you because they have a bad day. The Schengen Borders Code has a section on the entry and exit of third-country nationals and beyond obvious things such as counterfeited documents we have:
verification that the third-country national concerned, his or her means of transport and the objects he or she is transporting are not likely to jeopardise the public policy, internal security, public health or international relations of any of the Member States.
This is obviously a "rubber" paragraph -- but it shows there needs to be a rather substantial problem for a denial.