If you want to go for the merchants, the first thing to do is close with them by sneaking inside the destroyer screen. Look at the diagram below (S is your sub, D are destroyers, M are merchants), showing a typical way I approach a convoy attack. In this example the convoy is travelling north ("up") and you are approaching from the northwest. The easiest way is to get between the destroyer in front and the one at the side, and attack the merchant in the upper left hand corner of the merchant grouping. Make sure you are fairly deep and running slow and quietly as you get past the destroyers. Then come up to periscope depth and carry out the attack.
.........D
...S
D ..M M M.. D
.....M M M
........D
After you've fired, I set for silient running, dive deep, and follow my torps to get under the convoy. The escorts tend to look for you "outside", not in and amongst the merchants. Depending on the escorts response, you can either come back up after a while and have another shot from the other side of the convoy (with stern tubes perhaps) or slink away and escape.