Bikes have a very simple shifter. It always returns to home position and you can click down to downshift or click up to upshift. So, if you come to a dead stop in 4th, you're going to hold your bike up on one foot and click down three times. Eventually you're going to come to a dead stop just as the light turns green and look like a dick while you sit there for a few seconds getting ready. Or worse, the moron behind you doesn't realize it's a red light and you need to be moving five seconds ago.
But mechanically, yeah, you can shift at a stop just fine. It's just not good practice imo.