I wouldn't use them, but you can use them if you don't mind having a taller tire in the rear, they are 1 inch taller than the 40's. You want to be within 1% percent of variance. It's not as important for a rwd car, but It's very important for an awd car, it will mess up your awd system if you are not within 1% variance. I assume that you have 205/50 r17 in the front? I have 17 inch wheels and I use 225/45r17 front and 255/40r17 in the rear.
Use this tire calculator and you'll see if you are OK with the different height.
https://tiresize.com/calculator/