yes you can use a simple transistor to do your job. connect the LDR along with a potentiometer at the base of a transistor (refer image attached). potentiometer you need to adjust the trigger point based on light intensity. Resistor connected at base must be 10 times greater than resistor at collector to operate transistor as a switch this is a rule of the thumb. I have uploaded image please refer to it.