Evaporation of planetesimals due to bow shocks: heating by line emissions of water molecules