1) i guess crash dive is not mandatory...am i right ?
It is mandatory, a sub would not engage in a gunnery duel against an armed surface ship.
2) i guess if i make a crash dive ( succeded or not ), i must go for torpedo attack for this target and for the rest of targets when attacking convoy... And for this target when attacking loners...am i right ?
Yes. Though you probably want to engage rest of the loners with torpedoes aftewards, anyway. You have already lost the advantage of gunnery (the modifier for RTB roll) and torpedoes have better sinking odds.