UEFI doesn't much care what sort of storage medium something is on, so long as it is capable of reading it and it has a valid EFI partition. It is much less picky than BIOS, for which the El Torito standard had to be invented, and can be implemented easily on disks that use that format for dual-use. I haven't encountered UEFI implementations that don't support optical disks but I imagine it is possible there are some laptop vendors that might not have implemented optical drive support.