The Kantian moral philosophy is very optimistic. First of all, Kant's effort represents the last great philosophical attempt to unite the moral system notions used on a daily basis by people, to construct, at least in appearance, a traditional morality that consists of freedom, immortality, God, commandment, justice, etc.
But in fact, we see that these notions receive much deeper meanings, even in contradiction with the ones given by common sense. Still, his thinking cannot be anything but optimistic, because it tries to protect morality and its concepts, by offering a solid and fertile base.
Moreover, this base that consists of freedom, immortality, and God, does not rely on knowledge, but on faith. Placing freedom in the intelligible world, Kant saves it from determinism, but at the same time, he loses it to the unknown.
Despite this, he does not give up faith in it, and claims as a warning, which echoes through history that absolute freedom (as it is understand today as the possibility to do whatever you want) is a submission to the phenomenal world.
In turn, true freedom is submission to the moral law, one that is not a constraint of freedom, as the law is the creation of our will. But, even the submission to this law requires an act of faith, because in the phenomenal world it does not offer any rewards, satisfactions, self content, and the certainty of doing a moral act.
Kant is also famous for his moral argument for the existence of God, which is not really an argument, but a statement. The German philosopher wrote that although we cannot theoretically demonstrate the existence of God, for all practical necessities, we must assume his existence.
So, what is the so-called practical argument? Kant starts from the idea that every man has a certain sense of duty of right and wrong (a moral sense). Therefore, the question asked is: what should be true in order for morality to make sense? There has to be justice.
However, we live in a world where justice does not always prevail, and if in the final analysis, the bad guys prosper and the good guys suffer, then there is no rational reason for being virtuous.
But what is necessary in order for justice to have sense? If it is not served during the life of a person, then there has to be life after death, some kind of continuity of self-consciousness. However, just surviving death alone is not enough. There also has to be a judgment that applies justice.
This judgment has to be perfect, and because of this, we need a perfect judge with the following attributes: omniscient - he has to have all the information in order to give a decision, incorruptible - he has to be above all influences, omnipotent - he must be capable of imposing his decision.
In conclusion, for practical needs, for civilization, we must live as though there is a God. Without Him, who is the ultimate standard of goodness? Morality is irrational, and is limited to the preferences of a person or a group.
Kant identified all the necessary conditions for morality, but he did not remain on that level because he considered the conditions as viable.
This is opposed to any general sociologist, who in his analysis of a tribe's believes remains distant, and does not accept them, Kant studied and embraced human morality, and stated that morality is rational, and hence God exists.
But, the next generations of philosophers and thinkers, the "Nietzsches" of this world, simply say that "God has died", therefore morality is meaningless, and civilization is a joke.
Kant could have chosen the same road; he could have rejected the conditions that necessary for morality, and cannot be satisfied. Instead, he tried to offer us the possibility to believe without contradictions.