It's safe, but do it at a quiet time when there's low transactional activity. It's recommended to shrink the log to its minimal size and then grow it to its normal size (this will ensure the correct number of VLFs (internal virtual log files) are created, which improves performance for logged commands).
If the database's log doesn't shrink - if the database is in simple mode execute a checkpoint command first, if it's fully logged backup the log first.
If the log contains unprocessed mirrored or replication transactions then it may not shrink to a minimal size.
Remember to set an appropriate auto growth value.
See the following articles: