The compete and correct answer depends on which Mysql version you have and on which engine is the table.
Fast answer: no.
Only if you can have some downtime and want to take some risks (see below).
During the optimize, the table becomes I inaccessible, and if you need to use that table (selects, inserts, etc), then it's not a good idea to perform an scheduled downtime.
If you have mysql 5.6.17 or above, than you may do it without downtime, but I wouldn't recommend it.
Since mysql 5.6.17 that InnoDB can perform an optimize table with Online DDL, which means that selects, and even inserts, deletes and updates can be performed on the table while the optimize is running, if that is your case.
With that you can schedule an optimize on the table knowing that your system continues to run.
But it may not be safe to do it like that, as things may go wrong, and you're not with your eyes on the database to fix it ASAP. For example, you may not have free disk space for the optimize to run.
For 5.6.16 or lower, applies what I've said about myISAM.
Optimize table may lock your database users from accessing the database, if your mysql version doesn't support online ddl. And even if it supports, performing an operation like that automatically needs to be done with extreme care.
Maybe create a cron that sends you an email to remember to do the optimize?