Will a 950 nm IR emitter work with a 870 nm phototransistor?
Side by side: -



The receiver will be slightly off centre compared with the transmitter (purple lines I added are sitting at 950 nm) but the receiver will still be above 80% of its optimum sensitivity.

You should also consider that as the emitter warms up, the peak centre emission can move by 0.3 nm per degree C so, if it warmed 40 degC, the peak wavelength could move 12 nm. This could lower the overall receiver sensitivity into the 75 % area.

Bear also in mind that the graph of receiver sensitivity has a centre point that is defined as “typical” in the data sheet so, there could be some temperature dependency or drift associated with the receiver too. The data sheet does not appear to give details on this.