Women will be prosecuted "without mercy" if they are seen in public without a veil, Iran's judiciary chief has warned.