It's probably the lock mechanism (common problem). If the light comes on when you open the drivers door and the drivers door locks when you use the fob it won't be the bulb, fuse, key fob etc at fault.
I have a similar problem where when i lock the doors, the drivers one locks fine but the passenger one locks and then unlocks immediately after. As said above, this is a common problem due to a bably designed lock mechanism, i'm gonna replace mine when the weather gets warmer!