IR leds and 38KHz receivers as a optoencoder or similiar

The IR beam must be modulated at 38Khz and must be sending a PCM-style signal -- it will reject a continuous 38Khz signal (see page 5 of your datasheet). I don't think it will be possible to have the IR receiver send a continuous high signal.