You can certainly place a vertical spread using any set of strikes. Each set you choose simply changes the risk-reward ratios and it is up to the trader to decide which is best. You must remember that for any debit spread, the most you can make is the difference in strikes less the amount paid. The further both strikes are in-the-money, the more the spread will cost and the less profit will be available. The reason is that it is less risky.
In your example, buying the $45 call and selling the $50 call with the stock at $50 is less risky than, say, buying the $50 call and selling the $55. You’re right that the $45/$50 call spread will cost more but that is due to the lower risk. The greater the chance for profit, the higher the market bids the price.
For example, the $45/$50 call spread may cost $4 and therefore return $1 while the $50/$55 spread may cost $1 and return a maximum of $4. It’s a common misconception to think that the $50/$55 call spread must be less risky since there is less money at stake. Traders who believe this fail to account for the fact that there is a higher probability of losing that dollar. The two spreads are not equal in terms of probability. With the stock at $50, the $45/$50 spread doesn’t need the stock to move at all in order to achieve the maximum profit but the $50/$55 spread needs the stock price to increase five dollars to reach the maximum profit level.
Another way to understand why the $50/$55 spread is less risky is to understand that by selling the $50 strike (at-the-money) you have created a “premium collection” spread since you are receiving more time premium than you are spending. However, many traders believe it is a premium outlay strategy since it is a debit spread. However, the debit spread is a result of spending more dollars than you are receiving but dollars do not determine whether or not it is a premium collection strategy. The net time premiums are what matters.
You also asked about another variation of buying the $40 call and selling the $50 call. This will, as you stated, increase the maximum gain to the $10 difference in strikes. Is it riskier than the $45/$50 call spread? The time premium on the $40 call will be very small since it is so far in-the-money. Therefore, buying the $40 call and selling the $50 call will increase the net amount of time premium received when compared to the $45/$50 call spread but will cost more to acquire. The bottom line is that the $40/$50 call spread is less risky. It is less risky since you are buying very little time premium but receiving a lot from selling the at-the-money strike. No strike combination is right or wrong. It’s all about the tradeoffs and the resulting risks and rewards you are willing to accept.