No you can't.
The TRIAC based device switches on when the LED is on and the current is zero (zero crossing) and switches off when the LED is off and the current is zero. The TRIAC is on or off, nothing in between.
This device is for switching on/off devices on AC. For DC it would not work as the TRIAC would not switch off as the current needs to become zero for it to switch off (which does happen with AC).
An 817 is a linear device meaning the output current is proportional to the LED current. You can use this for voltage feedback in an isolated power supply for example. This device does not switch on/off very well.
All in all, these devices are both optical yet very different indeed.