Duct tape and painter's tape to cover baseboard heater
In theory, any tape that is truly designed for HVAC use should be OK. That would not include painters tape, and very likely not include ordinary duct tape (despite the name "duct", it is not necessarily rated for heating duct temperatures).

But for installation right next to an actual heater, I would recommend metal tape designed for high temperatures. Something like 3M High Temperature Flue Tape. I have not used this particular tape, but I have used similar tapes. Check the temperature rating - this one is rated for up 600 degrees Fahrenheit - and if your baseboard heater gets hotter than 600 degrees then you have bigger problems than a few bugs (a few well-roasted bugs).

Now that I see (thank you @bib) that you are talking about taping over vents, that gets a bit trickier. I thought it was just holes NEAR the heater - in which case high-temperature tape would certainly be fine. Blocking actual vents in the heater is potentially more of a problem because heat could build up inside the heater beyond the design limits - i.e., once the heater turns on it wouldn't turn off (unless the room warms up for other reasons) because the tape would trap most of the heat inside the heater.