In my book, it says racemic mixture is the mixture of + and - optical isomers and it is optically inactive. This means enantiomers (optical isomers which are mirror images to each other) can form racemic mixture. But can diastereomers (optical isomers which are not mirror image to each other) form a racemic mixture?
The short answer is no.
A racemic mixture is defined as an equimolar mixture of enantiomers. Since each enantiomer rotates plane polarized light equally, but in opposite directions, the overall optical activity is zero.
Describing diastereomers as optical isomers is incorrect. Diastereomers are stereoisomers (that is, compounds that have the same connectivity of atoms but differ by the orientation of atoms in space) but are not enantiomers. In many cases, diastereomers are not even chiral (have no optical activity). If there's a mixture of diastereomers that are chiral, this is not described as racemic. Most likely that mixture would be optically active, but even if it was optically inactive, that would just be coincidental and not considered racemic.
The situation where a mixture is made up of two enantiomers in equal ratios is so common (and important) that it gets the special name of racemic.
It's not like “enantiomers (…) can form racemic mixtures” and “Who else can form racemic mixtures?”; it's by definition. Also note that the term “racemic mixture” is discouraged.
Racemic Mixture (usage strongly discouraged)
The term is confusing since it has been used as a synonym for both racemate and racemic conglomerate.
An equimolar mixture of a pair of enantiomers. (…)
An equimolar mechanical mixture of crystals each one of which contains only one of the two enantiomers present in a racemate. (…)
(as in Basic Terminology of Stereochemistry, IUPAC Recommendations 1996).