yeah, it's compatible. Actually, I'm using a 1050ti on an Optiplex right now.
no crashes or problems.
are you still using the psu that came with the pc? I suggest getting a better power supply.
replaced the aged stock psu of mine because really old psu are not reliable anymore. Could cause auto shutdowns during gaming and some other horrors.
important question. Did you get that 1050ti brand new or used?