LightCode: Compiling LLM Inference for Photonic-Electronic Systems