Chances are good that it will not work as the optiplex is not a full-height system and so it is unlikely that the card would physically fit;
However, the MSI GeForce GTX 1050 Ti DirectX 12 GTX 1050 TI 4GT LP 4GB 128-Bit GDDR5 PCI Express 3.0 x16 HDCP Ready Low Profile Video Card likely WOULD work as it is a low-profile design.
Hope that helps. Good Luck!