If each lamp draws 1A when 24 VDC is applied, then each lamp has a resistance of:
V = IR -> R = V/I -> R = 24/1 = 24Ω Let's call that RL.
When the lamps are placed in your circuit, they will draw less current because of the series 15Ω /25W resistor. Neglecting the voltage drop across the switching transistors (TR3 and TR4), the current flowing through R1 can be calculated like this:
V = IR -> I = V/R -> I = V/(R1 + RL||RL) -> 24/(R1 + RL²/2RL) = 24/(15 + 24²/48) ≈ .9A
or .9A/2 = .45A per lamp
The entire .9A flows through R1 (neglecting the flow through your optocoupler) so we can calculate the power dissipated by it using:
P = IR² -> P = .9*15² ≈ 202W
That about 8 times R1's power dissipation rating. No wonder it is getting very hot very quickly.
So basically, you need to change the value of R1 so that it dissipates less power but still has a high enough voltage drop across it to turn on your optocoupler.
According to the KB815 data sheet, its input has a forward voltage of 1.2 - 1.4V. That means that the voltage drop across R1 must be 1.2 - 1.4V at a minimum to turn on the optocoupler and pull down Lp_Fail.
If we make R1 1Ω for example then the current flowing through it will be:
V = IR -> I = V/R -> I = V/(R1 + RL||RL) - > I = 24/(1+12) ≈ 1.85A
That means that R1 would have a voltage drop of:
V=IR -> V = 1.85A*1Ω = 1.85 V. That's greater than 1.4V so that means it would turn on the optocoupler.
The power dissipated would be:
P = IR² = 1.85A*(1Ω)² = 1.85W
So, a 1Ω/5W resistor would probably work just fine. However, since you didn't provide and information about TR3 and TR4, I don't know what VDS is for them. 1.85V is pretty close to 1.4V so it may not be OK to neglect VDS. I would try a 1Ω/5W resistor first and if that doesn't work I'd try a 2Ω/10W resistor.
You'll also have the change the value of R2 to compensate for the new value of R1. Once again, from the KB815 data sheet the maximum forward current is listed as 50 mA. We don't want to run our components at their absolute maximum ratings so lets pick a forward current of 20 mA for the KB815 input.
So, for the case of the 1Ω resistor, R2 should be:
V = IR -> R = V/I -> R = (VR1 - Vf)/(If) -> R = (1.85V - 1.4V)/(.02A) ≈ 22Ω
You can calculate the necessary value of R2 if you decide to go with a 2Ω resistor for R1.