You might get better results if you flash the LED on and off and check the input for a change between those two states. That will help filter out background light.
int onVal = 0;
int offVal = 0;
// Take 10 samples with the light ON and OFF
for (i=0; i<10; i++)
{
digitalWrite(IRLED, HIGH);
onVal += analogRead(IRTRANS);
digitalWrite(IRLED, LOW);
offVal += analogRead(IRTRANS);
}
if ((offVal - onVal) > THRESHOLD) // Value to be determined experimantally
{
// Light up the LED
}
else
{
// Turn off the LED
}