Might want to share the model and form factor for your OptiPlex. If there are screw mounting holes, you could get away with a thin ziptie. You could also use a ziptie to latch the slot on the chassis. This is all based on the assumption that the plastic latch was ripped out. To that extent, might want to share a picture of how badly you've broken the slot.
You're not referring to the PCIe slot on the motherboard, now, are you...?