The same advice as would be given to anyone running a half marathon - do a sensible training schedule.
But with type 1, your training schedule will have to include working out how best to manage your blood sugar when you run. You might need to think about adjusting your basal insulin to take account of long run days (on mdi only really levemir is flexible enough to do this), you might need to think about the timing of your last bolus dose before a run - novorapid lasts about 5 hours so if you run within 5 hours you will have active insulin on board.
Yes of course you can test blood sugar during a race. It really confuses the St. John's ambulance men if you choose to pause and test your blood sugar next to their ambulance though! But yes, if your running it's wise to test blood sugar before during and after a run - you might want to test during training at say every 3 or 5 miles see how much that kind of distance has on your blood sugar so you can decide when you need to stop and test during the race. The other alternative would be to get a CGM or a libre so you don't have to stop and test during a race - although do be aware that they run about 20mins behind what your blood sugar is doing and, occasionally they can struggle to keep up with fast moving blood sugar (which can happen with exercise).
Yes of course you can use gels. If your tests show you going low at a particular distance you might need to take on a gel to avoid a hypo. I've not used any gels because I'd be worried about over treating and just ending up running high, which I find much more difficult to deal with than running low. But you've got to have a little experiment with thes things to figure out what works for you.
Personally, my preference is to run with no active insulin on board. I run with an unbolused for breakfast. I run with medical alert ID (well I have a tattoo on my wrist because I got so narked with the bracelets). I run with my blood sugar monitor and hypo treatment and I use a CGM.
With post race good you might need to consider reducing your I:C ratio to take account of the exercise which might make you more insulin sensitive.