You can use Custom Filters in the Google Analytics widget to replicate the segments you created in your GA account. When creating filters in Google Analytics, you are required to select which aspects are to be taken into consideration, known as conditions. These are the ones that need to be replicated on the widget.
For example, you want to display only data for pages that contain Optmyzr or tools in the path:
You need to use the custom filter:
ga:pagePath=@optmyzr,ga:pagePath=@tools
The segments and dimensions are given by Google Analytics, as well as the syntax. You can learn how to use it here.