Physically you are able to drive while you have petit mal seizures (also known as absence seizures or staring spells) and maybe even in most of cases you will not have any issues, however, you have to realize that it only takes 1 time to have 1 error, which you may regret for the rest of your life.
For example imagine if 99 out of 100 times you drive somewhere there are no problems, but that 1 time you have a seizure for even as short as 10 seconds, but in those 10 seconds you don’t hit the brakes and end up killing a small child who ran across the road. If that would happen it would be a great tragedy.
That is why people who have petit mal seizures are told that they are not allowed to drive and this recommendation or instruction holds true until the person has not had any seizures for a period of an entire year. Only then, doctors (and the person himself or herself) can be confident that there will not be any more seizures while driving.
So please be on the safe side and do not drive while you have petit mal seizures.