What do you mean by hdmi to optical?
This ViewHD HDMI audio extractor (Amazon) is pretty close to what I am looking for. It takes hdmi a/v as a source, and outputs audio over SPDIF, but from its description:
The SPDIF optical audio output supports all audio formats up to 5.1CH Dolby Digital 5.1CH / AC3, DTS 5.1CH AND Dolby Digital Plus “DD+” formats. TOSLINK optical audio output does not support higher formats, such as HD audio (Dolby TrueHD, DTS-HD Master Audio, PCM5.1 and beyond).
The HDMI output has identical video and audio signals as the A/V signals coming into its HDMI input.
I don’t think it will actually transcode DD+ to DD. I think it will just pass through the optical out whatever audio comes in from the hdmi. Nothing I can find specifically describes transcoding.