Can an orthotic be put in a sandal?

Yes, if the sandal has a removable "foot bed" or insert.  In short, your custom orthotic simply replaces the space that foot bed insert used to occupy.  By doing this you get the support and comfort of your custom orthotics and they ultimately function very well as they become, in essence, part of the sandal.  Conversely, if there is no removable foot bed, then there is no place for the orthotic to "sit" in the sandal and therefore the orthotic will not function properly or well.  Your doctor can show you an example of a sandal with a removable foot bed or insert.