The first thing you should do is determine the source of the 50 Hz signal. If it is coming in on the power supply you should add better ripple filtering there. If it's coming in through the input you can try to notch it out with a filter.
In the second case you might try a gyrator.
A gyrator can transform a capacitance (C6) into an inductance which then acts like a series tuned circuit with another capacitance (C7), so you can use it as part of an attenuator to create a sharp notch. One place these are used is in audio graphic equalizers where there is one for each frequency band.
I've simulated the Lux meter circuit and gave it an input signal of a 10 mV triangle pulse with an offset or 50 mV, mixed with 10 mV of 50 Hz sine wave.
The output goes through a 4.7k resistor with the gyrator connected across the output. The output waveform taken before and after the 4.7k resistor shows the 50 Hz signal is greatly reduced without affecting the pulse.
The frequency can be adjusted by changing the values of R8 and R9, you can replace them with a potentiometer circuit.
With the gain changes you made to the circuit it may be getting overdriven enough to cause harmonics of 50 Hz, if that's the case a notch filter will not work as well and you would want to reduce the amplifier gain enough to keep it from distorting.
You can also try lowering the gain back down and adding a second amplifier, distributing the gain often works better than trying to get it all in one stage.