Only if G4 can last long enough which it wasn't shown to be. In fact the opposite was shown and Doffy survived one G4 burst. Due to Luffy's drawback on G4 this would lead to him losing a fight. IF Luffy could extend his G4 or make it indefinite then yes he could beat Doffy pretty easily but until he can last longer with G4 we can't say he can beat him with it just yet.