It's possible to both do a drive-through and do a pitstop the same time. When entering the pitlane with a DT-penalty you can turn into one of the "closed" pitboxes(I have only tested the last one). When the car is fully inside the box, you get the message that you have compleated your penelty. Then you can drive out of the box and a small distance the wrong way, and u can do a pitstop.
As FEL explained to me, the closed pitbox is outside the "pitarea" -> penelty cleared.
Edit: same with the first closed box too, and then you dont have to drive the wrong way to make a pitstop.