RASS-SDSS galaxy cluster survey. II. A unified picture of the cluster luminosity function