Yes you can remove the jumper cables while the car is running.
Start by removing the negative "black" cable first from your car and then remove the Negative cable and the positive cable at the same time from the other car.
Once you've removed both cables from the other car you can then remove the positive jumper cable "the red cable" from your cars battery.
Removing the jumper cables in this sequence helps prevent shorting out the battery on either car should you accidentally touch both positive and negative Jumper cables together.