Resistor for solid state relay (CPC1008N)
Assuming your control voltage is also 4.5V:

You need at least 2mA to guarantee activation of the relay.  

The diode forward voltage is specified as 1.5V max at If = 5mA.  So targeting 5mA to be conservative would mean you have 4.5V - 1.5V = 3V across your resistor.  

Using Ohm's law V/I = R gives a resistor value of 600 ohms.  Choose the next lower standard value, 590 ohms.  There's plenty of margin to the 2mA minimum so you could go higher if you want to save power.  

Since the abs max continuous forward current is 50mA there's no concern with exceeding that with the 590 ohm value.