From what I understand the inlet for the fuel pump does not go all the way to the bottom of the tank. This might be to allow for dirt and water in the fuel to settle and not get sucked into the fuel pump. So it is possible to be out of gas and yet not be out of gas in the tank.
It is definitely possible during stop and go situations for the fuel to slosh around in the tank, and at low fuel levels allows the possibility of no fuel being present at the pump when accelerating or braking. It also depends upon the location of the pump in the tank. It sounds to me like it is near the front of the tank. So when you accelerate the fuel moves to the rear of the tank leaving the pump to suck air. When acceleration levels off, the fuel returns to the pump. This condition should become worse as the level of fuel drops.
This is also very bad for the health of a fuel pump. Running a pump with no fuel to it will burn it up pretty quick. My advice would be to find a comfortable minimum level where you refuel regularly.